package com.zjk.product.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: gfk
 * @create: 2022/11/3
 * @Description:
 * @FileName: RabbitMQConfig
 * @History:
 * @自定义内容：
 */
@Configuration
public class RabbitMQConfig {
    private static final String QUEUE_NAME = "Queue_audit";


    /**
     * 队列持久化
     * @return
     */
    @Bean(QUEUE_NAME)
    public Queue queueDeclare(){
        return QueueBuilder.durable(QUEUE_NAME).build();
    }
}